﻿@model IEnumerable<HelloMinasan.Domain.Song>
@{
    ViewBag.Title = "All Songs";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="titleSection">
    <img src="@Url.Content("~/Content/Images/song.png")" width="20" height="20"/>
    <span class="titleTab">@ViewBag.Username 's Songs</span>
</div>
@if (User.Identity.Name == @ViewBag.Username)
{
    <div class="titleSection">
        <img src="@Url.Content("~/Content/Images/setting.png")" width="20" height="20"/>
        <span class="titleTab"><a href="@Url.Action("MySong", "UserManagement")">Manage my song list</a></span>
    </div>
}
<div class="contentSectionInside" style="margin-bottom: 10px;">
    <table width="100%">
        <tr>
            <td valign="top" style="padding-right: 20px;">
                <div class="contentSection">
                    @foreach (HelloMinasan.Domain.Song item in Model)
                    {
                        <div class="divListSong">
                            <div class="imgdivListSong">
                                <img src="@Url.Content("~/Content/Images/song.png")" />
                            </div>
                            <div class="contentdivListSong">
                                <div class="titleSongName">
                                    @item.SongName
                                </div>
                                <div style="margin-bottom: 5px; margin-top: 5px;">
                                    Lyric language : @item.LyricDetails.Count() language(s)
                                </div>
                                <div>
                                    <b>Posted date:</b> @item.PostedDate
                                </div>
                            </div>
                            <div class="optiondivListSong">
                                <a href="@Url.Content("~/Song/Songs/" + item.Id)">
                                    <img src="@Url.Content("~/Content/Images/play.png")" title="Listen to this song" />
                                </a>
                            </div>
                        </div>
                    }
                </div>
            </td>
            <td valign="top" style="width: 155px;">
                @{Html.RenderAction("UserInformationShortPartial", "Account");}
            </td>
        </tr>
    </table>
</div>
